package com.yonyou.pmclouds.procedure.processor;

import com.yonyou.pmclouds.basecom.bp.processor.SingleProcessor;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.procedure.entity.ProcedureVO;
import org.apache.commons.lang3.StringUtils;

public class ProcedureMultiInsertSetRootPk implements SingleProcessor<ProcedureVO> {

    @Override
    public void process(ProcedureVO vo, ProcedureVO orig) throws BusinessException {
        if(StringUtils.isEmpty(vo.getPkParent())){   //如果是根节点
            vo.setPkRoot(vo.getPkProcedure());
        }
    }
}
